package leetcode.code2074;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;
import leetcode.helper.tree.ListNode;

public abstract class Solution2074 implements IDebug {

	public abstract ListNode reverseEvenLengthGroups(ListNode head);

	@Override
	public void debug1() {
		ListNode r = this.reverseEvenLengthGroups(ListNode.set(HelpDebug.str2array3("[5,2,6,3,9,1,7,3,8,4]")));
		ListNode e = ListNode.set(HelpDebug.str2array3("[5,6,2,3,9,1,4,8,3,7]"));
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		ListNode r = this.reverseEvenLengthGroups(ListNode.set(HelpDebug.str2array3("[1,1,0,6]")));
		ListNode e = ListNode.set(HelpDebug.str2array3("[1,0,1,6]"));
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug3() {
		ListNode r = this.reverseEvenLengthGroups(ListNode.set(HelpDebug.str2array3("[2,1]")));
		ListNode e = ListNode.set(HelpDebug.str2array3("[2,1]"));
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug4() {
		ListNode r = this.reverseEvenLengthGroups(ListNode.set(HelpDebug.str2array3("[8]")));
		ListNode e = ListNode.set(HelpDebug.str2array3("[8]"));
		HelpDebug.compare(e, r);
	}

	public void debug5() {
		ListNode r = this.reverseEvenLengthGroups(ListNode.set(HelpDebug.str2array3("[1,1,0,6,5]")));
		ListNode e = ListNode.set(HelpDebug.str2array3("[1,0,1,5,6]"));
		HelpDebug.compare(e, r);
	}

}
